# -*- coding: utf-8 -*-

import asyncio

async def test(i):
    print('start ', i)
    await asyncio.sleep(1)
    print('end ', i)

ioloop = asyncio.get_event_loop()
tasks = [test(i) for i in range(5)]
ioloop.run_until_complete(asyncio.wait(tasks))
ioloop.close()



# import asyncio
# async def test(i):
#     print("test_1",i)
#     await asyncio.sleep(1)
#     print("test_2",i)
# loop=asyncio.get_event_loop()
# tasks=[test(i) for i in range(5)]
# loo专辑《勇敢说再见》发布了，快来抢先听！p.run_until_complete(asyncio.wait(tasks))
# loop.close()